addpath('npy-matlab-master\npy-matlab')
A1 = readNPY('CPGE_map_680nm_-24V_30K_x.npy')
A2 = readNPY('CPGE_map_680nm_-24V_30K_y.npy')
A2=A2*1e12

%this is because the noise is dominated if there is no photocurrent
for i =1:16
    for j =1:16
        if abs(A2(i,j))<0.1
            A1(i,j)= A1(i,j)*0.1
        end
    end
end

%the minus sign is to make the definition of LCP/RCP consistent between two
%CPGE devices.
A1=-fliplr(fliplr(A1).')

surf(A1,'edgecolor','none')
set(gca,'xlim',[6 16],'ylim',[3 13])
view(2)
%colormap(winter)
caxis([-0.15,0.15])
set(gca,'box','on','Xcolor',[0 0 0],'Ycolor',[0 0 0])
xticks({})
yticks({})
colorbar('Ticks',[-0.1:0.1:0.1],'TickLabels',{})
set(gcf,'Position',[0, 0, 380, 300])